|
|
|
|
|
|
|
A Typical Database before Normalization |
|
|
|
|
|
|
|
|
To illustrate the process of normalization, let's start with an existing database table. The database NORMDAT1.MDB can be found in the TYSDBVB5\SOURCE\DATA directory of the CD that shipped with this book. Load this into the Visdata application and open the Table1 data table in design mode. Your screen should look something like the one in Figure 16.1. |
|
|
|
|
|
|
|
|
Figure 16.1.
Displaying Table1 before normalization. |
|
|
|
|
|
|
|
|
This data table holds information about employees of a small company. The table contains fields for the employee ID and employee name, and the ID, name, and location of the department to which this employee is currently assigned. It also includes fields for tracking the employee's job skills, including the skill code, the name, the department in which the skill was learned, and the ability level that the employee has attained for the designated skill. Up to three different skills can be maintained for each employee. |
|
|
|
|
|
|
|
|
This table is rather typical of those you find in existing record-oriented databases. It is designed to quickly give users all the available information on a single employee. It is also a fairly simple task to build a data entry form for this data table. The single form can hold the employee and department fields at the top of the form and the three skill field sets toward the bottom of the form. Figure 16.2 shows a simple data form for this table generated by Visdata. |
|
|
|
|
|
|
|
|
Access to the information in the table is fast and the creation of a data entry screen is easy. So this is a well-normalized table, right? Wrong. Three of the five rules of normalization that you learn in the rest of this lesson are broken, and the other two are in jeopardy! Some of the problems are obvious, some are not. Let's go through each of the five rules of normalization and see how applying these rules can improve the data table. |
|
|
|
|
|